<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JS_获取信息</title>

    <script>

        window.onload=function(){


        var liArry=document.get.ElementsByClassName("li");
        for(let i=0;i<3;i++){}

        var iptArray=document.getElementsByName("user");
        iptArray[0].value='Hello';
        iptArray[1].value="world";
        }
        function fun1(e){
        e.preventDefault();
        return false;
        }
    </script>
</head>
<body>
<div id="div1"></div>
    <div>
        <form action="#">
            <input type="text" name="user">
            <input type="password" name="user" >
            <input type="submit" onclick="fun1">
        </form>
</div>
<div>
    <ul>
        <li class="li">li1</li>
        <li class="li">li2</li>
        <li class="li">li3</li>
    </ul>
</div>
</body>
</html>